<template>
  <div class="detail-title">
    <i @click='back' class='iconfont icon-xiangzuo'></i>
    <span>{{name}}</span>
  </div>
</template>

<script>
export default {
  props: ['name'],
  methods: {
    back() {
      // 需要触发绑定在自身上面的change事件
      this.$emit('change')
    }
  }
}
</script>

<style lang='scss' scoped>
.detail-title{
    position: fixed;
    height: .44rem;
    background: #fff;
    width: 100%;
    z-index: 10;
    line-height: .44rem;
    text-align: center;
    transition: all .5s linear;
    i{
      position: absolute;
      left:10px;
    }
  }
</style>
